package com.harmonyos.cases.constants;

import com.harmonyos.cases.utils.InsertUtils;

public class Constants {

    // 是否是debug版本
    public static final boolean IS_DEBUG = true;

    // http连接超时时间
    public static final int HTTP_CONNECT_TIMEOUT = 5000;
    // 瀑布流宽度
    public static final int WATER_FLOW_ITEM_WIDTH = 240;
    // 瀑布流文字高度
    public static final int WATER_FLOW_ITEM_TEXT_HEIGHT = 30;
    // 瀑布流间距
    public static final int WATER_FLOW_SPACING = 20;
    // 瀑布流padding
    public static final int WATER_FLOW_ITEM_PADDING_TOP = 5;
    public static final int WATER_FLOW_ITEM_PADDING_BOTTOM = 5;
    public static final int WATER_FLOW_ITEM_PADDING_LEFT = 10;
    public static final int WATER_FLOW_ITEM_PADDING_RIGHT = 10;
    // 瀑布流最小高度
    public static final int WATER_FLOW_ITEM_IMAGE_MIN_HEIGHT = 150;
    // 测试文件本地地址
    public static final String TEST_SETTING = InsertUtils.getCacheDirectory() + "/test_setting";
    // 本地下载文件夹名称
    public static final String CASE_SUB_DIR_NAME = "casesfeature";

    public static String PLUGIN_LOADING_PROGRESS = "loading...%d%%";
    // 插件名称
    public static final String PLUGIN_TITLE = "HarmonyOS NEXT组件市场";
    public static final String PLUGIN_GROUP_ID = "Import HarmonyOS Case";
    public static final String PLUGIN_SUB_TITLE = "请选择分类";
    public static final String PLUGIN_SEARCH = "请输入组件名";
    public static final String PLUGIN_CATEGORY_CASE = "case";
    public static final String PLUGIN_CATEGORY_LIBRARY = "library";
    public static final String PLUGIN_NOTIFICATION_TIP = "Tips";
    public static final String PLUGIN_NOTIFICATION_ERROR = "Error";
    public static final String PLUGIN_NOTIFICATION_OPEN = "Open file";

    // 问卷文字描述
    public static final String QUESTIONNAIRE_TEXT = "在HarmonyOS Next组件市场的使用过程中，如果遇到问题或者有其他改进意见，可通过问卷调查进行反馈~";
    public static final String QUESTIONNAIRE_URL = "https://wj.qq.com/s2/15658343/4734/";

    // GiteeApi请求地址
    public static String HOME_URL = String.format(Constants.BASE_URL, Constants.GITEE_OWNER, Constants.GITEE_REPO);
    // GiteeApi接口地址
    public static final String BASE_URL = "https://gitee.com/api/v5/repos/%s/%s/contents";
    // GiteeApi认证
    public static final String TEST_ACCESS_TOKEN = "?access_token=4701ddb7711d32029e9fcb422555caab&ref=";
    // 配置文件在线路径
    public static final String CONFIG_PATH = "https://gitee.com/harmonyos-cases/cases/raw/master/config.json";
    public static final String GITEE_OWNER = "harmonyos-cases";
    public static final String GITEE_REPO = "cases";
    public static final String CONFIG_HTML_PATH = "https://gitee.com/sephyrothcloud/CasesPlugin/tree/master/case_plugin/src/main/java/com/harmonyos/cases";
    // 测试链接
//    public static final String STATISTICS_COUNT = "https://gitee.com/sephyrothcloud/cases_1022/blob/PluginTracingPoint/plugin/statistics/tracecount";
//    public static String STATISTICS_PRE = "https://gitee.com/sephyrothcloud/cases_1022/tree/PluginTracingPoint/%sREADME.md";
    // 统计
    public static final String STATISTICS_COUNT = "https://gitee.com/harmonyos-cases/CasesPlugin";
    public static String STATISTICS_PRE = "https://gitee.com/harmonyos-cases/cases/tree/PluginTracingPoint/%sREADME.md";
}
